#ifndef STATUSVIEWER_H
#define STATUSVIEWER_H

#include <QObject>
#include <QStatusBar>
#include <QPushButton>
#include <QLabel>
#include <QTimer>

#include "../DataStructure/Enums.h"
#define LONG_DURATION 5000
#define SHORT_DURATION 2000

class DotController;

class StatusViewer : public QObject
{
    Q_OBJECT
public:
    void showTempMsg(QString msg, int timeout = 0);
    static StatusViewer *me(QStatusBar *pSB = NULL, DotController *pController = NULL);

public slots:
    void msgChanged(const QString &msg);
    void gameStarted();
    void lineAdded(Game::Player owner);
    void cellOwned(Game::Player owner);
    void gameFinished(Game::Player winner);
    void gameTurnChanged(Game::Player player);
    void gameCancelled();
    void gameStartStop();

protected:
    StatusViewer(QStatusBar *pSB, DotController *pController,QObject *pParent = 0);
    void setStartCancelButtonText(QString txt);

private:
    QStatusBar *mpStatusBar;
    QPushButton *mpStartCancelGame;
    DotController *mpController;

    static StatusViewer *mpMe;
};

#endif // STATUSVIEWER_H
